export {}

// 联合类型
let arr1: (string|number)[] = [];

arr1 = [1,"2"]
console.log(arr1)

// 类型别名 -- 复用
type itemType = (string|number)[]

let arr2: itemType

arr2 = [1,2,3,'string']
console.log(arr2)

// 字符串或者数组类型
type dataType = number | string[]

let arr3:dataType = 123
console.log(arr3)

let arr4:dataType = ['1,2,3']
console.log(arr4)